__author__ = 'AndreyKa'

from selenium.webdriver.common.by import By
from php4dvd.pages.page import Page


class AddMoviePage(Page):
    """
    This is a common description of the 'add movie' page.
    """
    @property
    def IMDb_number_field(self):
        return self.driver.find_element(By.XPATH, "//*[@name='imdbid']")

    @property
    def title_field(self):
        return self.driver.find_element(By.XPATH, "//*[@name='name']")

    @property
    def known_as_field(self):
        return self.driver.find_element(By.XPATH, "//*[@name='aka']")

    @property
    def year_field(self):
        return self.driver.find_element(By.XPATH, "//*[@name='year']")

    @property
    def duration_field(self):
        return self.driver.find_element(By.XPATH, "//*[@name='duration']")

    @property
    def rating_field(self):
        return self.driver.find_element(By.XPATH, "//*[@name='rating']")

    @property
    def format_field(self):
        return self.driver.find_element(By.XPATH, "//*[@name='format']")

    @property
    def trailer_field(self):
        return self.driver.find_element(By.XPATH, "//*[@name='trailer']")

    @property
    def notes_field(self):
        return self.driver.find_element(By.XPATH, "//*[@name='notes']")

    @property
    def taglines_field(self):
        return self.driver.find_element(By.XPATH, "//*[@name='taglines']")

    @property
    def plotoutline_field(self):
        return self.driver.find_element(By.XPATH, "//*[@name='plotoutline']")

    @property
    def plots_field(self):
        return self.driver.find_element(By.XPATH, "//*[@name='plots']")

    @property
    def languages_field(self):
        return self.driver.find_element(By.XPATH, "//*[@name='languages']")

    @property
    def subtitles_field(self):
        return self.driver.find_element(By.XPATH, "//*[@name='subtitles']")

    @property
    def audio_field(self):
        return self.driver.find_element(By.XPATH, "//*[@name='audio']")

    @property
    def video_field(self):
        return self.driver.find_element(By.XPATH, "//*[@name='video']")

    @property
    def country_field(self):
        return self.driver.find_element(By.XPATH, "//*[@name='country']")

    @property
    def genres_field(self):
        return self.driver.find_element(By.XPATH, "//*[@name='genres']")

    @property
    def director_field(self):
        return self.driver.find_element(By.XPATH, "//*[@name='director']")

    @property
    def writer_field(self):
        return self.driver.find_element(By.XPATH, "//*[@name='writer']")

    @property
    def producer_field(self):
        return self.driver.find_element(By.XPATH, "//*[@name='producer']")

    @property
    def music_field(self):
        return self.driver.find_element(By.XPATH, "//*[@name='music']")

    @property
    def cast_field(self):
        return self.driver.find_element(By.XPATH, "//*[@name='cast']")

    @property
    def submit_button(self):
        return self.driver.find_element(By.XPATH, "//*[@name='submit']")

    @property
    def file_button(self):
        return self.driver.find_element(By.XPATH, ".//input[@type='file']")

